from sklearn.datasets import load_iris
iris = load_iris()
# print(iris.data)
# print(iris.target)
# print(iris.feature_names)
# print(iris.target_names)
# print(iris.DESCR)
# 返回值的类型是bunch类型

# 数据可视化
import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd

iris_d=pd.DataFrame(iris.data,columns=['Sepal_Length', 'Sepal_Width', 'Petal_Length', 'Petal_Width'])
iris_d["target"]=iris.target
print(iris_d)

def iris_polt(data,col1,col2):
    sns.lmplot(x=col1,y=col2,data=data,hue="target",fit_reg=False)
    plt.show()

iris_polt(iris_d,'Petal_Width', 'Sepal_Length')

# 数据集的划分
# from sklearn.model_selection import